define(function(require){
	var $ = require("jquery");
	var justep = require("$UI/system/lib/justep");
   
	//require("../../misc/js/shuatiyun");

	var Model = function(){
		this.callParent();
	};
    // 图片路径转换
	Model.prototype.transUrl = function(row) {
		var url = (typeof row === "object") ? "./img/" + row.val("imageName") : row
	    return require.toUrl(url);
	};
	//点击切换语言
	Model.prototype.button1Click = function(event){
      justep.Shell.showPage("main",{yucode : 2});   
	};
   
	Model.prototype.modelParamsReceive = function(event){    
       var data=this.comp("yaodian");
       data.clear();
       data.loadData([this.params.rowdata]);
       data.first();
       console.log(data.toJson());
       $.ajax({
			type:"GET",
			url:window.yuming+'/app/getDrug/'+11,
			async: false,
			cache: false,
			success:function(datas){
				console.log(data);
			},
			error:function(e){
			}
		})
	};
   
	Model.prototype.li3Click = function(event){
       var row=event.bindingContext.$object;
       this.comp("windowDialog1").open({
        params:{
              rowdata:row.toJson()
        }     
       });
	};
   
   
	return Model;
});